import request from '@/utils/http'

// 底层持仓明细
export async function find_by_portfolio_code(params?: any): Promise<any>{
  return request(`/api/fund/portfolio/dh_portfolio_bond_credit/find_by_portfolio_code`,{
    method: 'POST',
    data: params
  })
}
// 信用债行业分布
export async function fund_credit_dept_industry_rate(params?: any): Promise<any>{
  return request(`/api/fund/fund_credit_dept_industry_rate/find_by_portfolio_code`,{
    method: 'POST',
    data: params
  })
}
// 城投债行业分布
export async function fund_city_investment_province_rate(params?: any): Promise<any>{
  return request(`/api/fund/fund_city_investment_province_rate/find_by_portfolio_code`,{
    method: 'POST',
    data: params
  })
}

// 根据组合代码查询对应的债券投资占比
export async function queryInvestRatio(params?: any): Promise<any>{
  return request(`/api/fund/dh_portfolio_bond_type_allocation/find_by_portfolio_code`,{
    method: 'POST',
    data: params
  })
}

// 加权久期
export async function weighting_duration(params?: any): Promise<any>{
  return request(`/api/fund/portfolio/fixed_income_assets/weighting_duration`,{
    method: 'POST',
    data: params
  })
}

// 可转债查询
export async function find_convertible_bond_by_portfolio_code(params?: any): Promise<any>{
  return request(`/api/fund/portfolio/dh_portfolio_bond_credit/find_convertible_bond_by_portfolio_code`,{
    method: 'POST',
    data: params
  })
}



